3.235 \(\int \frac{\cos (c+d x) \sin (c+d x)}{(a+a \sin (c+d x))^2} \, dx\)

Optimal. Leaf size=37 \[ \frac{1}{d \left (a^2 \sin (c+d x)+a^2\right )}+\frac{\log (\sin (c+d x)+1)}{a^2 d} \]

[Out]

Log[1 + Sin[c + d*x]]/(a^2*d) + 1/(d*(a^2 + a^2*Sin[c + d*x]))

________________________________________________________________________________________

Rubi [A]  time = 0.048023, antiderivative size = 37, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 25, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.12, Rules used = {2833, 12, 43} \[ \frac{1}{d \left (a^2 \sin (c+d x)+a^2\right )}+\frac{\log (\sin (c+d x)+1)}{a^2 d} \]

Antiderivative was successfully verified.

[In]

Int[(Cos[c + d*x]*Sin[c + d*x])/(a + a*Sin[c + d*x])^2,x]

[Out]

Log[1 + Sin[c + d*x]]/(a^2*d) + 1/(d*(a^2 + a^2*Sin[c + d*x]))

Rule 2833

Int[cos[(e_.) + (f_.)*(x_)]*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)
])^(n_.), x_Symbol] :> Dist[1/(b*f), Subst[Int[(a + x)^m*(c + (d*x)/b)^n, x], x, b*Sin[e + f*x]], x] /; FreeQ[
{a, b, c, d, e, f, m, n}, x]

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rubi steps

\begin{align*} \int \frac{\cos (c+d x) \sin (c+d x)}{(a+a \sin (c+d x))^2} \, dx &=\frac{\operatorname{Subst}\left (\int \frac{x}{a (a+x)^2} \, dx,x,a \sin (c+d x)\right )}{a d}\\ &=\frac{\operatorname{Subst}\left (\int \frac{x}{(a+x)^2} \, dx,x,a \sin (c+d x)\right )}{a^2 d}\\ &=\frac{\operatorname{Subst}\left (\int \left (-\frac{a}{(a+x)^2}+\frac{1}{a+x}\right ) \, dx,x,a \sin (c+d x)\right )}{a^2 d}\\ &=\frac{\log (1+\sin (c+d x))}{a^2 d}+\frac{1}{d \left (a^2+a^2 \sin (c+d x)\right )}\\ \end{align*}

Mathematica [A]  time = 0.0278844, size = 27, normalized size = 0.73 \[ \frac{\frac{1}{\sin (c+d x)+1}+\log (\sin (c+d x)+1)}{a^2 d} \]

Antiderivative was successfully verified.

[In]

Integrate[(Cos[c + d*x]*Sin[c + d*x])/(a + a*Sin[c + d*x])^2,x]

[Out]

(Log[1 + Sin[c + d*x]] + (1 + Sin[c + d*x])^(-1))/(a^2*d)

________________________________________________________________________________________

Maple [A]  time = 0.03, size = 35, normalized size = 1. \begin{align*}{\frac{1}{d{a}^{2} \left ( 1+\sin \left ( dx+c \right ) \right ) }}+{\frac{\ln \left ( 1+\sin \left ( dx+c \right ) \right ) }{d{a}^{2}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(d*x+c)*sin(d*x+c)/(a+a*sin(d*x+c))^2,x)

[Out]

1/d/a^2/(1+sin(d*x+c))+ln(1+sin(d*x+c))/a^2/d

________________________________________________________________________________________

Maxima [A]  time = 1.40492, size = 46, normalized size = 1.24 \begin{align*} \frac{\frac{1}{a^{2} \sin \left (d x + c\right ) + a^{2}} + \frac{\log \left (\sin \left (d x + c\right ) + 1\right )}{a^{2}}}{d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)*sin(d*x+c)/(a+a*sin(d*x+c))^2,x, algorithm="maxima")

[Out]

(1/(a^2*sin(d*x + c) + a^2) + log(sin(d*x + c) + 1)/a^2)/d

________________________________________________________________________________________

Fricas [A]  time = 1.43138, size = 104, normalized size = 2.81 \begin{align*} \frac{{\left (\sin \left (d x + c\right ) + 1\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) + 1}{a^{2} d \sin \left (d x + c\right ) + a^{2} d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)*sin(d*x+c)/(a+a*sin(d*x+c))^2,x, algorithm="fricas")

[Out]

((sin(d*x + c) + 1)*log(sin(d*x + c) + 1) + 1)/(a^2*d*sin(d*x + c) + a^2*d)

________________________________________________________________________________________

Sympy [A]  time = 1.02931, size = 95, normalized size = 2.57 \begin{align*} \begin{cases} \frac{\log{\left (\sin{\left (c + d x \right )} + 1 \right )} \sin{\left (c + d x \right )}}{a^{2} d \sin{\left (c + d x \right )} + a^{2} d} + \frac{\log{\left (\sin{\left (c + d x \right )} + 1 \right )}}{a^{2} d \sin{\left (c + d x \right )} + a^{2} d} + \frac{1}{a^{2} d \sin{\left (c + d x \right )} + a^{2} d} & \text{for}\: d \neq 0 \\\frac{x \sin{\left (c \right )} \cos{\left (c \right )}}{\left (a \sin{\left (c \right )} + a\right )^{2}} & \text{otherwise} \end{cases} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)*sin(d*x+c)/(a+a*sin(d*x+c))**2,x)

[Out]

Piecewise((log(sin(c + d*x) + 1)*sin(c + d*x)/(a**2*d*sin(c + d*x) + a**2*d) + log(sin(c + d*x) + 1)/(a**2*d*s
in(c + d*x) + a**2*d) + 1/(a**2*d*sin(c + d*x) + a**2*d), Ne(d, 0)), (x*sin(c)*cos(c)/(a*sin(c) + a)**2, True)
)

________________________________________________________________________________________

Giac [A]  time = 1.28639, size = 76, normalized size = 2.05 \begin{align*} -\frac{\frac{\log \left (\frac{{\left | a \sin \left (d x + c\right ) + a \right |}}{{\left (a \sin \left (d x + c\right ) + a\right )}^{2}{\left | a \right |}}\right )}{a} - \frac{1}{a \sin \left (d x + c\right ) + a}}{a d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)*sin(d*x+c)/(a+a*sin(d*x+c))^2,x, algorithm="giac")

[Out]

-(log(abs(a*sin(d*x + c) + a)/((a*sin(d*x + c) + a)^2*abs(a)))/a - 1/(a*sin(d*x + c) + a))/(a*d)